Running a Poisson regression is similar in many ways to running the other common kinds of
regression, but there are some differences. Here are the steps:
1. As with any regression, prepare your predictor and outcome variables in your data.
For this example, you have a row of data for each year, so year is the experimental unit. For each
row, you have a column containing the outcome values, which is number of accidents each year
(Accidents). Since you have one predictor — which is year — you have a column for Year.
2. Tell the software which variables are the predictor variables, and which one is the outcome.
3. Tell the software what kind of regression you want it to carry out by specifying the family of
the dependent variable’s distribution and the link function.
Step 3 is not obvious, and you may have to consult your software’s help file. In the R program, as
an example, you have to specify both family and link in a single construction, which looks like this:
This code tells R that the outcome is the variable Accidents, the predictor is the variable Year, and
the outcome variable follows the Poisson family of distributions. The code
tells
R that you want to fit a model in which the true event rate rises in a linear fashion, meaning that it
increases by a constant amount each year.
4. Execute the regression and obtain the output.
The next step is to interpret the output.
TABLE 19-1 Yearly Data on Fatal Highway Accidents in One City
Calendar Year Fatal Accidents
2010
10
2011
12
2012
15
2013
8
2014
8
2015
15
2016
4
2017
20
2018
20
2019
17
2020
29
2021
28